# Base Image
FROM php:7.0-fpm

# Author
MAINTAINER c32 amd5@qq.com

# setting time
ENV TZ=AsiaShanghai

# System commod
RUN ln -snf usrsharezoneinfo$TZ etclocaltime && echo $TZ  etctimezone
ADD ./sources.list /etc/apt/sources.list
#ADD ./oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm /oracle-instantclient12.1-basic-12.1.0.2.0-1.x86_64.rpm
#ADD ./oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm /oracle-instantclient12.1-devel-12.1.0.2.0-1.x86_64.rpm

# redis扩展
RUN pecl install -o -f redis \
	&&  rm -rf /tmp/pear \
	&&  docker-php-ext-enable redis

# oracle扩展

	
	
#RUN apt-get update \
#	&& apt-get install -y wget \
#	&& wget https://pecl.php.net/get/oci8-2.1.1.tgz \
#	&& tar zxvf oci8-2.1.1.tgz -C ./ \
#	&& cd oci8-2.1.1/ \
#	&& phpize \
#	&& ./configure --with-oci8=shared,instantclient,/usr/local/instantclient_10_2 \
#	&& make \
#	&& make install


RUN apt-get update \
	&& apt-get install --assume-yes \
		apt-utils \
		libfreetype6-dev \
		libjpeg62-turbo-dev \
		libpng-dev \
		libmcrypt-dev \
    # install ext
    && docker-php-ext-install pdo_mysql \
    && docker-php-ext-install -j$(nproc) mcrypt \
    # install custom ext
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install -j$(nproc) gd



#iconv 